package cn.pzhu.services.web;

import cn.pzhu.model.Member;
import cn.pzhu.services.BaseServices;

/**
 * Created by dongp on 2016/5/14.
 */
public class WebMemberServices extends BaseServices {

	public boolean memberApply(int userID, String email,String phone, String postCode, String identity, String address, String unitName,
							String profitYear, String techArea, String profile){
		boolean result = new Member().set("userID",userID)
				.set("email", email)
				.set("phone", phone)
				.set("postCode", postCode)
				.set("identity", identity)
				.set("address", address)
				.set("unitName",unitName)
				.set("profitYear",profitYear)
				.set("techArea",techArea)
				.set("profile",profile)
				.save();

		return result;
	}

	public  Member queryMember(int userID) {
		Member member = Member.dao.findFirst("select t1.*,t2.dName from member t1 left join dict t2 on t1.status = t2.dVal where userID = ? ", userID);
		return member;
	}
}
